package com.kmv.slave;

import java.rmi.Naming;
import java.rmi.RMISecurityManager;

import com.kmv.RunnerI;
import com.kmv.Task;

/**
 *  
 */
public class SlaveRunner {

    public static void main( String[] args ) throws Exception {
        System.setSecurityManager( new RMISecurityManager() );
        RunnerI t = (RunnerI) Naming.lookup( "//peppy:2005/PerfectTime" );
        for ( int i = 0; i < 10; i++ ) {
            System.out.println( "Run task on the slave. Command: "
                                + t.runTask( new Task( "Task command." ) ) );
        }
    }
}
